package cn.iocoder.yudao.module.erp.controller.admin.dp.vo;

import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.module.system.enums.DictTypeConstants;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * 制单 Excel 导入 VO
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ExcelIgnoreUnannotated
@Accessors(chain = false) // 设置 chain = false，避免用户导入有问题
public class DpImportExcelVO {

    private Integer storeType;

//    @ExcelProperty("单号")
    private String id;

    @ExcelProperty("货号")
    private String no;

    @ExcelProperty("入库件数")
    private Integer inCount;

    @ExcelProperty("入库品名")
    private String inName;

    @ExcelProperty("入库体积")
    private Double inVolume;

    @ExcelProperty("重量")
    private Double weight;

    @ExcelProperty("密度")
    private Double density;

    @ExcelProperty("送货人电话")
    private String deliveryPhone;

    @ExcelProperty("送货人名称")
    private String deliveryName;

//    @ExcelProperty("线路选择 东线1 西线2")
    @DictFormat(DictTypeConstants.Erp_Line_Type)
    private Integer line;

    @ExcelProperty("线路详情")
    private String way;

    @ExcelProperty("发货人")
    private String shipper;

    @Schema(description = "发货地")
    private String departure;

    @ExcelProperty("目的地")
    private String destination;

    @ExcelProperty("收货人")
    private String consignee;

    @ExcelProperty("备注")
    private String note;

    @ExcelProperty("垫付打包费")
    private Double advancePayPack=0.00;

    @ExcelProperty("垫付提货费")
    private Double advancePayPackUp=0.00;

    @ExcelProperty("垫付运费")
    private Double advancePayChinaFreight=0.00;

    @ExcelProperty("垫付货款")
    private Double advancePayForGoods=0.00;

//    @Schema(description = "垫付金额")
//    @ExcelProperty("垫付金额")
//    private Double earpayAmount;

    @ExcelProperty("货值")
    private Double goodsValue;

    @ExcelProperty("保率")
    private Integer guaranteedRate;

    @ExcelProperty("收保费")
    private Double premium=0.00;

    @ExcelProperty("代收")
    private Double collecting=0.00;

    @ExcelProperty("客户返点")
    private Double customerRebate;

    @ExcelProperty("业务返点")
    private Double businessRebate;

    @ExcelProperty("业务员")
    private String salesman;

    @ExcelProperty("单价")
    private Double unitPrice;

    @ExcelProperty("立方单价")
    private Double cubeUnitPrice;

//    @Schema(description = "")
    @ExcelProperty("金额计算 1按重量 2按立方 3按整车 4按重量和立方 5垫付加运费")
    @DictFormat(DictTypeConstants.Erp_Calmethod_Type)
    private Integer calmethod;

    @ExcelProperty("是否核销 0否1是")
    @DictFormat(DictTypeConstants.ERP_IS_NO)
    private Integer writeOff;

    @ExcelProperty("核销费用")
    private Double writeExpenses;

//    @Schema(description = "审核状态 未审核0 审核1", example = "1")
//    @ExcelProperty("审核状态")
//    private Integer status;

    @ExcelProperty("支付类型(1国内支付 2国外支付)")
    @DictFormat(DictTypeConstants.ERP_PAY_METHOD)
    private Integer payType;

    private Integer remCount;

    private Double remVolume;

    private Double remWeight;

    @ExcelProperty("总金额")
    private Double totalAmount;

    @ExcelProperty("优惠金额")
    private Double discountAmount=0.00;

    @Schema(description = "制单时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("制单时间(格式2025-01-01)")
    private String chooseDate;

    private Boolean deleted;
}
